Parallelize CI lint jobs and switch to Debug variant#22637
Parallelize CI lint jobs and switch to Debug variant#22637
Conversation
Move locale consistency checks into a separate parallel CI job and disable checkDependencies for app-level lint. This removes ~4-6 min of gem install + fastlane overhead from each lint job's critical path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The baseline was generated with checkDependencies=true, so switching it off causes 234 baseline entries to become "fixed" and surfaces new UnusedResources errors. Reverting until the baseline can be regenerated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set checkDependencies=false for app-level lint to avoid scanning the entire dependency tree - Add add_ignore_attr to local library string configs so merged strings are not flagged as unused without dependency checking - Add separate CI lint jobs for editor, login, and image-editor libraries to maintain lint coverage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
The baseline was generated with checkDependencies=true, which meant dependency-sourced issues were included. With checkDependencies=false, the baseline needs to reflect app-module-only lint results. This also captures MissingNullAnnotation warnings that were always present but never baselined. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With checkDependencies=false, lint can't see that certain resources defined in the app are used by editor/login library modules. Add targeted ignore rules in lint.xml for these specific resources instead of regenerating the entire baseline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Debug variants skip R8/ProGuard minification during compilation, which reduces lint wall time especially on cold caches. All app code is identical between debug and release — BuildConfig.DEBUG checks are runtime conditionals, not compile-time code removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflicts: - lint.sh: Keep VanillaDebug variants (PR intent: faster lint) - localization.rb: Keep add_ignore_attr (needed with checkDependencies disabled), drop removed Login Library module Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The login module was removed in PR #22564. Remove the now-invalid libs:login lint CI step and login-specific lint ignore rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Vanilla flavour no longer exists. Use lintWordpressDebug and lintJetpackDebug instead of the non-existent VanillaDebug variants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switching to Debug caused 357 baseline mismatches (the baseline was generated against Release). Regenerating the baseline would balloon it from 8k to 65k lines. Keep Release variant — the speedup from this PR comes from checkDependencies=false, parallel lib lints, and separating locale checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lint Debug is faster than Release (no R8/minification). The blocker was 5,124 MissingNullAnnotation issues that only surface on Debug, ballooning the baseline from 8k to 65k lines. Ignoring these checks entirely (they were already partially suppressed for generated code) allows a clean switch to Debug with a net baseline reduction (8k -> 4k lines). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generated by 🚫 Danger |
Test code accounts for ~20% of source files but generates ~64% of baseline issues (mostly DoNotMockDataClass). Skipping test source analysis should meaningfully reduce lint wall time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit d8f4072.
|
There was a problem hiding this comment.
Pull request overview
This PR optimizes CI lint/validation throughput by switching app lint to Debug, disabling dependency checking for lint, and parallelizing previously-serial checks into separate Buildkite steps.
Changes:
- Switch WordPress/Jetpack lint tasks to Debug variants and disable
lint.checkDependencies. - Split locale consistency and selected library lint into separate parallel Buildkite jobs.
- Update lint configuration/baseline behavior to match the new Debug + no-dependency-analysis setup.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
fastlane/lanes/localization.rb |
Adjusts library string merge settings to match the new lint/dependency behavior. |
config/lint/lint.xml |
Updates ignored lint issues and adds suppressions for resources now “invisible” with checkDependencies=false. |
build.gradle |
Disables lint dependency checking at the app level. |
.buildkite/pipeline.yml |
Adds parallel Locale Consistency + library lint steps alongside existing lint jobs. |
.buildkite/commands/lint.sh |
Switches app lint commands (and SARIF path) from Release to Debug variants. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if .buildkite/commands/should-skip-job.sh --job-type validation; then | ||
| exit 0 | ||
| fi | ||
|
|
There was a problem hiding this comment.
The Locale Consistency step uses should-skip-job.sh --job-type validation, which (per should-skip-job.sh) will skip when changes are limited to fastlane/**, config/**, and **/strings.xml. Since this job’s purpose is to validate Fastlane locale lists vs Gradle resourceConfigurations, skipping on those files can let inconsistencies slip through. Consider using a job-type/skip rule that still runs when fastlane/lanes/localization.rb (and related locale config) changes, or adjust the skip logic for this step accordingly.
| if .buildkite/commands/should-skip-job.sh --job-type validation; then | |
| exit 0 | |
| fi |
| - label: "🕵️ Lint libs:editor" | ||
| command: | | ||
| if .buildkite/commands/should-skip-job.sh --job-type lint; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| .buildkite/commands/restore-cache.sh | ||
| ./gradlew :libs:editor:lint | ||
| plugins: [$CI_TOOLKIT] |
There was a problem hiding this comment.
This job runs ./gradlew :libs:editor:lint. If the intent is to lint the Debug variant for speed (matching the app lint switch to Debug), consider invoking the variant-specific task (e.g., :libs:editor:lintDebug) to avoid running additional variants. Also consider adding artifact_paths for lint reports (like the app lint steps) so failures are debuggable from CI artifacts.
| ./gradlew :libs:image-editor:lint | ||
| plugins: [$CI_TOOLKIT] |
There was a problem hiding this comment.
Same as the editor lint step: ./gradlew :libs:image-editor:lint may run more than the Debug variant. If the goal is Debug-only lint for faster CI, prefer the variant-specific lint task (e.g., :libs:image-editor:lintDebug). Also add artifact_paths for lint reports so the job produces the same diagnostics as the app lint steps.
| ./gradlew :libs:image-editor:lint | |
| plugins: [$CI_TOOLKIT] | |
| ./gradlew :libs:image-editor:lintDebug | |
| plugins: [$CI_TOOLKIT] | |
| artifact_paths: | |
| - "**/build/reports/lint-results*.*" |
| <ignore path="**/res/color/aztec_format_button_selector_color.xml" /> | ||
| <ignore path="**/res/color/primary_on_surface_disabled_selector.xml" /> | ||
| <ignore path="**/res/values-night/colors_aztec.xml" /> |
There was a problem hiding this comment.
The new UnusedResources ignores use very broad paths like **/res/color/..., which will suppress findings anywhere those filenames appear across the repo. To reduce the chance of hiding legitimate issues in other modules later, consider narrowing these ignores to the specific module path where these resources live (e.g., WordPress/src/main/res/...).
| <ignore path="**/res/color/aztec_format_button_selector_color.xml" /> | |
| <ignore path="**/res/color/primary_on_surface_disabled_selector.xml" /> | |
| <ignore path="**/res/values-night/colors_aztec.xml" /> | |
| <ignore path="**/libs/editor/src/main/res/color/aztec_format_button_selector_color.xml" /> | |
| <ignore path="**/libs/editor/src/main/res/color/primary_on_surface_disabled_selector.xml" /> | |
| <ignore path="**/libs/editor/src/main/res/values-night/colors_aztec.xml" /> |
|
👋 @jkmassel and team, I went through the changes and below my suggestions: (love the extra
FYI: From the above, you'll also notice that the DOAndroid team gets notified on Slack when such a
if [ "$1" = "library" ]; then
./gradlew :libs:editor:lint :libs:image-editor:lint
exit 0
fiI am sure that doing the above wouldn't make this FYI: In addition, to fully replicate the previous
if [ "$1" = "library" ]; then
./gradlew :libs:analytics:lint :libs:editor:lint :libs:fluxc:lint :libs:image-editor:lint :libs:mocks:lint :libs:networking:lint :libs:posttypes:lint :libs:image-editor:lint
exit 0
fiPS: Obviously, and as per Copilot's commends (here + here), use Let me know what you think! 💭 |







Summary
checkDependenciesfor app-level lint, avoiding redundant analysis of transitive dependenciesMissingNullAnnotationchecks excluded (Java-only, not relevant for Kotlin-first codebase – anything that has this warning is a prime candidate for replacement by Kotlin code)CI timing comparison
Developer wait time is determined by the slowest job in the parallel group. The bottleneck shifts from Jetpack lint (6m 10s) to WordPress lint (4m 32s).
Trade-offs
checkDependencies falsemeans lint won't detect issues in library module sources from app-level lint. Library modules are now linted in their own dedicated CI jobs instead.Test plan
🤖 Generated with Claude Code